home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Talking Clock Pro™ 2.0.1 / Talking Clock Pro Source / Controller / Headers / window.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-08-25  |  1.6 KB  |  62 lines  |  [TEXT/CWIE]

  1. /*
  2.  * window.h
  3.  */
  4.  
  5.  
  6. #pragma once
  7. #ifndef window_h
  8. # define window_h
  9.  
  10.  
  11. # define errCancel 1
  12.  
  13. typedef struct defWindowRec {
  14.  
  15.     short                windID ;
  16.     Handle                data ;
  17.  
  18.     OSErr                ( * OnCreate ) ( WindowPtr , Handle * , FSSpec * ) ;
  19.     OSErr                ( * OnDestroy ) ( WindowPtr , Handle ) ;
  20.  
  21.     OSErr                ( * DoUpdate ) ( WindowPtr , Handle , EventRecord * ) ;
  22.     OSErr                ( * DoMouseDown ) ( WindowPtr , Handle , EventRecord * ) ;
  23.     OSErr                ( * DoMouseUp ) ( WindowPtr , Handle , EventRecord * ) ;
  24.     OSErr                ( * DoKeyDown ) ( WindowPtr , Handle , EventRecord * ) ;
  25.     OSErr                ( * DoAutoKey ) ( WindowPtr , Handle , EventRecord * ) ;
  26.     OSErr                ( * DoActivate ) ( WindowPtr , Handle , EventRecord * ) ;
  27.     OSErr                ( * DoSwitch ) ( WindowPtr , Handle , EventRecord * ) ;
  28.     OSErr                ( * DoIdle ) ( WindowPtr , Handle , long * ) ;
  29.     OSErr                ( * PrepareMenus ) ( WindowPtr , Handle ) ;
  30.     OSErr                ( * DoCommand ) ( WindowPtr , Handle , short menu , short item ,
  31.                             unsigned char * itemStr ) ;
  32.     OSErr                ( * DoAppleEvent ) ( WindowPtr , Handle , AppleEvent * , AppleEvent * ) ;
  33.  
  34. } DefWindowRec ;
  35.  
  36.  
  37. extern Boolean quit ;
  38. extern long gSleep ;
  39. extern RgnHandle gMouse ;
  40. extern EventRecord gEvent ;
  41. extern Rect gDragLimit ;
  42. extern Rect gSizeLimit ;
  43. extern DefWindowRec app ;
  44.  
  45.  
  46. WindowPtr MakeWindow ( FSSpec * file , DefWindowRec * ) ;
  47. OSErr DestroyWindow ( WindowPtr window ) ;
  48.  
  49. void DriveWindow ( void ) ;
  50. void HandleEvent ( EventRecord * event ) ;
  51. void IdleFrontWindow ( void ) ;
  52.  
  53. DefWindowRec * GetFrontWindow ( WindowPtr * wp ) ;
  54. DefWindowRec * RecFromWindow ( WindowPtr window ) ;
  55.  
  56. Boolean InFront ( void ) ;
  57. void Notify ( void ) ; 
  58. void DeNotify ( void ) ;
  59.  
  60. #endif /* window_h */
  61.  
  62.